﻿Public Class frmDangNhap

    Private Sub btnDangNhap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDangNhap.Click
        Dim th As TapHoa = New TapHoa()
        th.m_strTenDangNhap = txtTenDangNhap.Text
        th.m_strMatKhau = txtMatKhau.Text
        If (TapHoaDAO.DangNhap(th).Rows.Count = 1) Then
            Dim frm As frmQuanLyTapHoa = New frmQuanLyTapHoa()
            frm.Tag = TapHoaDAO.DangNhap(th).Rows(0)(0).ToString()
            frm.Show()
        Else
            MessageBox.Show("Nhập sai tên đăng nhập hoặc mật khẩu !")
        End If

    End Sub

    Private Sub btnThoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThoat.Click
        Application.Exit()
    End Sub
End Class